import java.util.Scanner;

public class Test7 {
    public static void main(String[] args) {
        square s1 = new square();
        System.out.println("s1:edge=" + s1.getEdge());
        System.out.println("s1:area=" + s1.getArea());
        square s2 = new square();
        int edge = new Scanner(System.in).nextInt();
        s2.setEdge(edge);
        System.out.println("s2:edge=" + s2.getEdge());
        System.out.println("s2:area=" + s2.getArea());
    }

}
class square{
    private int edge;

    public square() {
        this.edge = 2;
        System.out.println("this is constructor method");
    }

    public int getEdge() {
        return edge;
    }

    public void setEdge(int edge) {
        if(edge <= 0){
            this.edge = 1;
        }else {
            this.edge = edge;
        }
    }
    public int getArea(){
        return edge*edge;
    }
}